package com;

import com.i2p.commons.util.Base64Util;
import com.i2p.commons.util.DateUtils;
import com.i2p.commons.util.PropertiesUtils;


/**
 * 邮件内容模板
 * @author swp
 * @create 2017-03-06 15:31
 **/
public class EmailContext {

    public String RegEmailMsg() {
        String user_id = "";
        String username = "";
        String webname = "";
        String email = "";
        String sign = "";
        String active_id = Base64Util.encodeToString((user_id + "," + DateUtils.getCurrentTime() + "," + email));//加密
        String serverName = PropertiesUtils.getUseValue("email_send_path");//主机域名
        String _url = ""+serverName+"/usersActive.action?id="+active_id+"&sign="+sign;
        String send_email_msg = "<div style=\"background: url("+serverName+"/images/email/email_bg.png) no-repeat left bottom; font-size:14px; width: 588px; \">"
                + "<div style=\"padding: 10px 0px; background: url("+serverName+"/images/email/email_button.png)  no-repeat \">"
                + "<h1 style=\"padding: 0px 15px; margin: 0px; overflow: hidden; height: 48px;\">"
                + "<a title=\""+webname+"用户中心\" href=\""+serverName+"/users.action\" target=\"_blank\" swaped=\"true\">"
                + "<img style=\"border-width: 0px; padding: 0px; margin: 0px;\" alt=\""+webname+"用户中心\" src=\""+serverName+"/images/logo.jpg\" height=\"48\" width=\"208\">		</a></h1>"
                + "<div style=\"padding: 0px 20px; overflow: hidden; line-height: 40px; height: 50px; text-align: right;\"> </div>"
                + "<div style=\"padding: 2px 20px 30px;\">"
                + "<p>亲爱的 <span style=\"color: rgb(196, 0, 0);\">"+username+"</span> , 您好！</p>"
                + "<p>感谢您注册"+webname+"，您登录的邮箱帐号为 <strong style=\"font-size: 16px;\">"+email+"</strong></p>"
                + "<p>请点击下面的链接即可完成激活。</p>"
                + "<p style=\"overflow: hidden; width: 100%; word-wrap: break-word;\"><a title=\"点击完成注册\" href=\""+_url+"\" target=\"_blank\" swaped=\"true\">"+_url+"</a>"
                + "<br><span style=\"color: rgb(153, 153, 153);\">(如果链接无法点击，请将它拷贝到浏览器的地址栏中)</span></p>"
                + "<p>感谢您光临"+webname+"用户中心！ <br>现在就登录吧!"
                + "<a title=\"点击登录"+webname+"用户中心\" style=\"color: rgb(15, 136, 221);\" href=\""+serverName+"/users.action\" target=\"_blank\" swaped=\"true\">"+serverName+"/users.action</a></p>"
                + "<p style=\"text-align: right;\"><br>"+webname+"用户中心 敬启</p>"
                + "<p><br>此为自动发送邮件，请勿直接回复！如您有任何疑问，请点击<a title=\"点击联系我们\" style=\"color: rgb(15, 136, 221);\" href=\""+serverName+"/articles_page.action?code=lxwm\" target=\"_blank\" >联系我们&gt;&gt;</a></p>"
                + "</div></div></div>";
        return send_email_msg;
    }
}
